import {BasicColumn} from '/@/components/Table';
import {FormSchema} from '/@/components/Table';
import { rules} from '/@/utils/helper/validator';
import { render } from '/@/utils/common/renderUtils';
import { getWeekMonthQuarterYear } from '/@/utils';
//列表数据
export const columns: BasicColumn[] = [
  {
    title: '创建人',
    align:"center",
    dataIndex: 'createBy',
    resizable:true
  },
  {
    title: '创建日期',
    align:"center",
    dataIndex: 'createTime',
    resizable:true
  },
  {
    title: '更新日期',
    align:"center",
    dataIndex: 'updateTime',
    resizable:true
  },
  {
    title: 'id',
    align:"center",
    dataIndex: 'id',
    resizable:true
  },
  {
    title: '名称',
    align:"center",
    dataIndex: 'name',
    resizable:true
  },
  {
    title: '单位',
    align:"center",
    dataIndex: 'unit',
    resizable:true
  },
  {
    title: '备注',
    align:"center",
    dataIndex: 'remark',
    resizable:true
  },
];

//子表列表数据
export const packagingDetailsColumns: BasicColumn[] = [
  {
    title: '工厂',
    align:"center",
    dataIndex: 'factoryId_dictText',
    resizable:true
  },
  {
    title: '包材',
    align:"center",
    dataIndex: 'packagingId_dictText',
    resizable:true
  },
  {
    title: '总库存',
    align:"center",
    dataIndex: 'totalStock',
    sorter: true,
    resizable:true
  },
  {
    title: '占用库存',
    align:"center",
    dataIndex: 'lockStock',
    sorter: true,
    resizable:true
  },
  {
    title: '可用库存',
    align:"center",
    dataIndex: 'stock',
    sorter: true,
    resizable:true
  },
  {
    title: '单位',
    align:"center",
    dataIndex: 'unit',
    resizable:true
  },
];

// 高级查询数据
export const superQuerySchema = {
  createBy: {title: '创建人',order: 0,view: 'text', type: 'string',},
  createTime: {title: '创建日期',order: 1,view: 'datetime', type: 'string',},
  updateTime: {title: '更新日期',order: 2,view: 'datetime', type: 'string',},
  name: {title: '名称',order: 3,view: 'text', type: 'string',},
  remark: {title: '备注',order: 4,view: 'text', type: 'string',},
};
